<?php if( !empty( $arFiles ) ): ?>
    <div id="sortable">
    <?php foreach( $arFiles as $obj ): ?>
        <div id="id_<?php echo $obj->getId()?>" class="sort_product">
            <div class="sort_picture">
                <?php echo image_tag( '/images/gallery/tiny/' . $obj->getUname()); ?>
            </div>
            </div>
    <?php endforeach; ?>
    </div>
<?php endif; ?>
<?php if ($sf_request->hasErrors()): ?>
    <?php foreach ($sf_request->getErrorNames() as $name): ?>
        <span style="color:red; font-weight:bold;"><?php echo __($sf_request->getError($name)); ?></span><br/>
    <?php endforeach; ?>
<?php endif; ?>
<div style="clear: both;"></div>
<?php echo form_tag('crop/photos', 'method=post multipart=true'); ?>
        <?php echo input_hidden_tag('id', $objId);?>
        <?php echo input_hidden_tag('type', $objType);?>
        <?php echo input_file_tag('photo'); ?>
        <div style='width: 400px; height: 50px;'>
        <?php echo __('name:'); ?><br />
        <?php echo input_tag('gallery[photoname]', '', array('style' => 'width:220px;')) ?><br />
        </div>
        
        <div style='width: 400px; height: 50px;'>
        <?php echo __('text:'); ?><br />
        <?php echo input_tag('gallery[phototext]', '', array('style' => 'width:220px;')) ?><br />
        </div>
        <?php echo submit_tag('upload'); ?>
</form>